<#if mode == "multistage">
FROM node:14 as BUILDER
WORKDIR /softwise-src
COPY . .
RUN --mount=type=cache,target=./node_modules npm i --registry=https://registry.npm.taobao.org && npm run ${profile}

FROM nginx as APP
COPY nginx.conf /etc/nginx/nginx.conf
COPY --from=BUILDER /softwise-src/dist/  /usr/share/nginx/html/
<#else>
FROM nginx
COPY nginx.conf /etc/nginx/nginx.conf
COPY ./dist/  /usr/share/nginx/html/
</#if>